Programming in HTML: Completed In 1 DAY by LRN AYOUB
Author:LRN, AYOUB [LRN, AYOUB]
Language: eng
Format: epub
Publisher: UNKNOWN
Published: 2020-12-02T16:00:00+00:00
This example shows how to create a file, body.css, containing style elements that can be applied to any document by using the l i n k element, as in Document 2.4b. The . c s s extension is standard, but not required. (You could use . t x t, for example, although there is no reason to confuse matters by doing that.) This example is very simple, but the concept is powerful because it makes it easy to create a standard style for all your documents which can be invoked with the l i n k element. The Impact font chosen for h1 headings may not be supported by all browsers. If not, a default font will be used in its place.
The attributes of l i n k include href, which contains the URL of the style sheet file, the r e l = " s t y l e s h e e t " (relationship) attribute, which describes how to use thefile (as a style sheet), and the type, which should be " t e x t / c s s ", just as it would be defined if you created a s t y l e element directly in the head element. In this example, body.css is in the same folder as st yl e 2. h tm. If you keep your style sheets in a separate folder, you will of course need to reference that folder.
This discussion has barely scratched the surface of style sheets. Style sheets can make your web pages more visually appealing and can greatly simplify your work on large Web projects. Some developers advocate replacing all individual formatting elements, such as f o n t and its attributes, with style sheet specifications. Despite the fact that the use of individual formatting elements isâdeprecatedâ in favor of using CSS, there is little likelihood that support for individual elements will disappear from browsers in the foreseeable future. For the kinds of applications discussed in this book, cascading style sheets may sometimes be convenient, but they are not required.
2.6 Another Example
Documents 2.5a and 2.5b show how to use a style sheetfile to specify different background and text colors for different sections of text. Document 2.5a (rwb.css)
p . r e d { b a c k g r o u n d : r e d ; c o l o r : b l u e ; f o n t : 2 0 p t Times} d i v . w h i t e { b a c k g r o u n d : w h i t e ; c o l o r : r e d ; f o n t : 2 0 p t Times} s p a n . b l u e
{ b a c k g r o u n d : b l u e ; c o l o r : w h i t e ; f o n t : 2 0pt Times}
Document 2.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Ada | Ajax |
Assembly Language Programming | Borland Delphi |
C & C++ | C# |
CSS | Compiler Design |
Compilers | DHTML |
Debugging | Delphi |
Fortran | Java |
Lisp | Perl |
Prolog | Python |
RPG | Ruby |
Swift | Visual Basic |
XHTML | XML |
XSL |
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7775)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6796)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6521)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6388)
Kotlin in Action by Dmitry Jemerov(5062)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4315)
Functional Programming in JavaScript by Mantyla Dan(4037)
Solidity Programming Essentials by Ritesh Modi(3979)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3769)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3712)
The Ultimate iOS Interview Playbook by Avi Tsadok(3687)
